package database

import (
	"database/sql"
	_ "github.com/mattn/go-sqlite3"
	"goexample.com/vulscaner/common"
	"log"
)

func GetRows(sql_string string) *sql.Rows {
	dbPath := common.AbsolutPath() + "/db/task.db"
	db, err := sql.Open("sqlite3", dbPath)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()
	rows, err := db.Query(sql_string)
	if err != nil {
		log.Fatal(err)
		return nil
	}
	return rows
}
